package com.hellowx_ssm.aop.factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by IntelliJ IDEA.
 *
 * @author MagicMushroom
 * @date 2021/6/17
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext app = new ClassPathXmlApplicationContext("/applicationContext-two-factory.xml");
        UserService userService = (UserService) app.getBean("userService");
        userService.login(new User());
        userService.register(new User());
    }
}
